package com.system.queue.util;

import java.time.LocalDate;
import java.time.Period;

/**
 * @className: BirthToAgeUtil
 * @description: TODO 类描述
 * @author: Kuangkeli
 * @date: 2023/11/30 19:32
 **/
public class BirthToAgeUtil {
    public static int calculateAge(LocalDate birthday) {
        LocalDate currentDate = LocalDate.now();
        return Period.between(birthday, currentDate).getYears();
    }
}
